package com.yupi.usercenter.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.usercenter.model.DTO.TeamJoinDTO;
import com.yupi.usercenter.model.DTO.TeamQuery;
import com.yupi.usercenter.model.DTO.TeamQuitDTO;
import com.yupi.usercenter.model.DTO.TeamUpdateDTO;
import com.yupi.usercenter.model.VO.TeamUserVO;
import com.yupi.usercenter.model.domain.Team;
import com.yupi.usercenter.model.domain.User;

import java.util.List;

/**
* @author 20654
* @description 针对表【team(队伍)】的数据库操作Service
* @createDate 2025-05-03 20:03:56
*/
public interface TeamService extends IService<Team> {

    /**
     * 添加队伍
     * @param team
     * @return
     */
    long addTeam(Team team, User loginUser);

    List<TeamUserVO> listTeams(TeamQuery teamQuery,User loginUser);

    /**
     * 更新队伍
     * @param teamUpdateDTO
     * @return
     */
    boolean updateTeam(TeamUpdateDTO teamUpdateDTO,User loginUser);

    /**
     * 加入队伍
     * @param teamJoinDTO
     * @return
     */
    boolean joinTeam(TeamJoinDTO teamJoinDTO,User loginUser);

    /**
     * 退出队伍
     * @param teamQuitDTO
     * @return
     */
    boolean quitTeam(TeamQuitDTO teamQuitDTO, User loginUser);

    /**
     * 删除队伍
     * @param id
     * @return
     */
    boolean deleteTeam(Long id, User loginUser);

    TeamUserVO getTeamUserById(Long teamId);
}
